package org.example.domain;

import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlRootElement;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlAttribute;

/**
 * 奇葩，类上面注解用的 jakarta-api4.0，字段属性上用的javax2.4，其他都接受不到
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class WxOutputMessage {

    @XmlAttribute(name = "ToUserName")
    private String ToUserName;
    @XmlAttribute(name ="FromUserName")
    private String FromUserName;
    @XmlAttribute(name ="CreateTime")
    private Long CreateTime;
    @XmlAttribute(name ="MsgType")
    private String MsgType = "text";
    @XmlAttribute(name ="MsgId")
    private Long MsgId;
    // 文本消息  
    @XmlAttribute(name ="Content")
    private String Content;
}